<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script>
    //1.创建一个空对象
    var student={};
    //2.在空对象中 存储数据
    student['name']='小王'
    student.age=18;
    student.sex='男';
    student.play=function () {
            console.log('打游戏');
    }
    //3.访问对象中的成员
    console.log(student.name);
    student.play();


</script>